<div id="infobox-fullwidth" class="margin-left"> 
	<table>
		<thead>
			<tr>
				<th>Câu hỏi</th>
				<th>Người trả lời</th>
				<th>Email</th>
				<th>Nội dung trả lời</th>
				<th>Tình trạng</th>
				<th></th>
			</tr>
		</thead>
		<tbody>
		<?php foreach($listanswer as $ans):?>
			<tr> 
				<td> 
				<?php if($questionid != null):?> <?php foreach($questionid as $quest):?>
				<?php if($quest->id == $ans->question_id):?> <?php echo $quest->title_question;?>
				<?php endif;?> <?php endforeach;?> <?php endif;?>
				</td>
				<td><?php echo $ans->fullname;?></td>
				<td>
					<?php echo $ans->email;?>
				</td> 
				<td><?php echo $ans->content?></td>
				<td><?php if($ans->status == 0):?>
						Chờ duyệt
					<?php elseif($ans->status==1):?>
						Đã duyệt
					<?php else:?>
					<?php endif;?>
				</td>
				<td>
				 	<?php if($ans->status == 0):?>
					<a href="<?php echo site_url('admincp/update_answer/'.$ans->id);?>">Cho phép</a>
				 	<?php endif;?>
					&nbsp;&nbsp;&nbsp;
					<a href="<?php echo site_url('admincp/del_answer/'.$ans->id);?>">Xóa</a>
				</td>
			</tr>
			<?php endforeach;?> 
		</tbody>
	</table>
</div>
